package com.gxa.customer.controller;

import com.gxa.common.commons.R;
import com.gxa.common.params.*;
import com.gxa.common.pojo.HousePaymentDetail;
import com.gxa.customer.service.HousePaymentDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customer/housePaymentDetail")
public class HousePaymentDetailController {
    @Autowired
    private HousePaymentDetailService housePaymentDetailService;

    /**
     * 新增支付明细记录
     * @param param
     * @return
     */
    @PostMapping("/addHousePaymentDetail")
    public R addHousePaymentDetail(@RequestBody HousePaymentDetailAddParam param){
        return housePaymentDetailService.addHousePaymentDetail(param);
    }
    /**
     * 查询房款支付明细
     * @param param
     * @return
     */
    @PostMapping("/queryHousePaymentDetail")
    public R queryHousePaymentDetail(@RequestBody QueryHousePaymentDetailParam param){
        return housePaymentDetailService.queryHousePaymentDetail(param);
    };

    /**
     * 修改房款支付明细
     * @param param
     * @return
     */
    @PostMapping("/updateHousePaymentDetail")
    public R updateHousePaymentDetail(@RequestBody UpdateHousePaymentDetailParam param){
        return housePaymentDetailService.updateHousePaymentDetail(param);
    };

    /**
     * 删除房款支付明细
     * @param id
     * @return
     */
    @PostMapping("/delHousePaymentDetail")
    public R delHousePaymentDetail(Long id){
        return housePaymentDetailService.delHousePaymentDetail(id);
    };
}
